package org.asiainfo.im.server.listener;

import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.listener.ConnectListener;
import lombok.extern.slf4j.Slf4j;

import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * socket-io 连接监听器
 *
 * @author dotor-ww
 */
@Slf4j
public class SocketIOServerConnectListener implements ConnectListener {

    /**
     * 客户端接入
     *
     * @param client 客户端
     */
    @Override
    public void onConnect(SocketIOClient client) {
        UUID sessionId = client.getSessionId();
        log.info("服务端接入用户,sessionId:{}", sessionId);
        Map<String, List<String>> urlParams = client.getHandshakeData().getUrlParams();
        System.out.println("客户端接入");
    }
}
